/*
 * @author hoang.pt
 * @version $Id$
 */

package snippet.theory4;

//can use class autoloader
import java.io.*;


/**
 * Stream File
 * @author hoang.pt
 */
public class FileInputStreamDemo {

	/**
	 * Main
	 * @param args
	 * @throws IOException
	 */
    public static void main(String[] args) throws IOException {
        System.out.println("Demo of file stream.");
    	
    	try {
            FileInputStream fiStream = new FileInputStream("D:/Projects/aptech_c0909hv_gaj/trunk/hoang.pt/sample.txt");
            System.out.println(fiStream);
            
            //--read first
            int i = fiStream.read();
            //--close
            fiStream.close();
            System.out.println(i);

        } catch (FileNotFoundException ex) {
            ex.printStackTrace();
        }

    }



}
